import java.util.Random;
import java.util.Scanner;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-02-18
 * Time: 19:40
 */
public class Test {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int n = random.nextInt(100) + 1;
        int x = 0;
        System.out.println("请猜一个数");
        while (scanner.hasNextInt()){
            x = scanner.nextInt();
            if (x > n){
                System.out.println("猜大了");
            } else if (x < n){
                System.out.println("猜小了");
            } else{
                System.out.println("恭喜，猜对了");
                break;
            }
        }
    }
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        System.out.println("请输入：");
//        int a= scanner.nextInt();
//        int b= scanner.nextInt();
//
//        System.out.println(a);
//        System.out.println(b);
//    }
//    public static void main(String[] args) {
//        int a = 5;
//        int ret = 1;
//        int n = 1;
//        int sum = 0;
//        while(n <= 5){
//            ret *= n;
//            sum += ret;
//            n++;
//        }
//
//        System.out.println(sum);
//    }
}
